/**
 * 
 */
package com.dsteiner.xelavos.client.model;

import java.beans.PropertyChangeListener;

import com.dsteiner.widgets.client.PropertyChangeCollection;
import com.dsteiner.widgets.client.domain.ModelObject;

public class DisplayModel {
	private PropertyChangeCollection propertyChangeSupport = new PropertyChangeCollection(
			this);

	public void addPropertyChangeListener(String propertyName,
			PropertyChangeListener listener) {
		propertyChangeSupport.registerPropertyChangeListener(propertyName,
				listener);
	}

	private ModelObject modelObject;

	public ModelObject getModelObject() {
		return modelObject;
	}

	public void setModelObject(ModelObject modelObject) {
		Object oldModelObject = this.modelObject;
		this.modelObject = modelObject;
		propertyChangeSupport.firePropertyChange("modelObject", oldModelObject, modelObject);
	}
}